package com.lagou.blog.service;

import com.lagou.blog.entity.ArticleEntity;
import com.lagou.blog.repository.ArticleRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class ArticleService {

    @Autowired
    private ArticleRepository articleRepository;

    public Page<ArticleEntity> findPage(Pageable pageable){
        return articleRepository.findAll(pageable);
    }

}
